﻿@model ithub.Models.LoginUser
@{
    

    ViewBag.Title = "Edit user";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<script type="text/javascript">
    $(document).ready(function () {

        $('#frmImage').ajaxForm({
            beforeSend: function () {
                $("#imgUser").attr("src", "../img/loaders/loader_re.gif");
            },
            uploadProgress: function (event, position, total, percentComplete) {

            },
            success: function (data) {
                if (data.Result == "OK") {                    
                    $("#imgUser").attr("src", data.Path);
                }
            },
            complete: function (xhr) {

            }
        });

        $("#flImage").change(function () {
            $('#frmImage').submit();
        });
    });

   
    
</script>
<div class="row-fluid">
    <div class="span3">
        <div class="ushort clearfix">
        <form id="frmImage" action="@Url.Action("UploadImage", "Users")" method="post" enctype="multipart/form-data">
            <a href="#">Aqvatarius</a>
            @if (Model.myImage != null)
            {
                <a href="#">
                    <img id="imgUser" src="@Url.Content(Model.myImage.path)" class="img-polaroid"></a>
            }
            else
            {
                <a href="#">
                    <img id="imgUser" src="../img/users/user_profile.jpg" class="img-polaroid"></a>
            }

            <input type="hidden"  id="id" name="id" value="@Model.myObject.user_id"/>
            <input type="hidden"  id="module" name="module" value="@App_Utils.clsConstants.StringValue.GetStringValue( App_Utils.clsConstants.module.User)"/>
            <input type="file" name="image" id="flImage" />
            </form>
        </div>
        @*<div class="block-fluid without-head">
            <div class="toolbar nopadding-toolbar clearfix">
                <h4>
                    Change password</h4>
            </div>
            <div class="row-form clearfix">
                <div class="span4">
                    Password</div>
                <div class="span8">
                    <input type="password" name="password" /></div>
            </div>
            <div class="row-form clearfix">
                <div class="span4">
                    Confirm</div>
                <div class="span8">
                    <input type="password" name="repassword" /></div>
            </div>
            <div class="toolbar clear clearfix">
                <div class="right">
                    <button type="button" class="btn btn-small btn-warning">
                        <span class="icon-ok icon-white"></span>
                    </button>
                </div>
            </div>
        </div>*@
    </div>
    <div class="span6">
        <div class="block-fluid without-head">
            <div class="toolbar clearfix">
                @*<div class="left">
                    <div class="btn-group">
                        <button type="button" class="btn btn-small btn-success tip" title="Send mail">
                            <span class="icon-envelope icon-white"></span>
                        </button>
                        <button type="button" class="btn btn-small btn-info tip" title="User page">
                            <span class="icon-info-sign icon-white"></span>
                        </button>
                    </div>
                </div>*@
                <div class="right">
                    <div class="btn-group">
                        <button type="button" class="btn btn-small btn-warning tip" title="Quick save">
                            <span class="icon-ok icon-white"></span>
                        </button>
                        @*<button type="button" class="btn btn-small btn-danger tip" title="Delete user">
                            <span class="icon-remove icon-white"></span>
                        </button>*@
                    </div>
                </div>
            </div>
            <div class="row-form clearfix">
                <div class="span3">
                    First Name</div>
                <div class="span9">
                    <input type="text" name="first_name" id="first_name" value="@Model.myObject.first_name" />
                </div>
            </div>
            <div class="row-form clearfix">
                <div class="span3">
                    Last Name</div>
                <div class="span9">
                    <input type="text" name="last_name" id="last_name" value="@Model.myObject.last_name" />
                </div>
            </div>
            <div class="row-form clearfix">
                <div class="span3">
                    Login Id</div>
                <div class="span9">
                    <b>@Model.myObject.login_id</b>
                </div>
            </div>
            <div class="row-form clearfix">
                <div class="span3">
                    Password</div>
                <div class="span9">
                    <input type="password" name="password" id="password" value="@Model.myObject.password" />
                </div>
            </div>
        </div>
    </div>
    <div class="span3 clearfix">
        

       
        <div class="head clearfix">
            <div class="isw-mail">
            </div>
            <h1>
                Email</h1>
        </div>
        <div class="block">
            <address>
                <a href="mailto:#">first.last@gmail.com</a>
            </address>
        </div>

         <div class="head clearfix">
            <div class="isw-mail">
            </div>
            <h1>
                Phone</h1>
        </div>
        <div class="block">
            <address>
                (123) 456-7890
            </address>
        </div>

    </div>
    @*<div class="span3 clearfix">
        <div class="row-fluid">
            <div class="span12">
                <div class="block-fluid without-head">
                    <div class="row-form clearfix">
                        <div class="span10">
                            Activated user
                        </div>
                        <div class="span2">
                            <input type="checkbox" value="1" name="activate" checked="checked" />
                        </div>
                    </div>
                    <div class="row-form clearfix">
                        <div class="span10">
                            Allowed to comment
                        </div>
                        <div class="span2">
                            <input type="checkbox" value="1" name="comment" />
                        </div>
                    </div>
                    <div class="row-form clearfix">
                        <div class="span10">
                            Premium account
                        </div>
                        <div class="span2">
                            <input type="checkbox" value="1" name="premium" checked="checked" />
                        </div>
                    </div>
                    <div class="row-form clearfix">
                        <div class="span10">
                            Allowed to post
                        </div>
                        <div class="span2">
                            <input type="checkbox" value="1" name="activate" checked="checked" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="row-fluid">
            <div class="span12">
                <div class="block-fluid without-head clearfix">
                    <ul class="sList" id="selectable_1">
                        <li>Administrator</li>
                        <li>Content manager</li>
                        <li class="ui-selected">Developer</li>
                        <li>User</li>
                    </ul>
                </div>
            </div>
        </div>
    </div>*@
</div>
